#ifndef __WIFIIOT_PWM_H__
#define __WIFIIOT_PWM_H__

typedef enum {
    /** 160 MHz working clock */
    WIFI_IOT_PWM_CLK_160M,
    /** 24 MHz or 40 MHz external crystal */
    WIFI_IOT_PWM_CLK_XTAL,
    /** Maximum value */
    WIFI_IOT_PWM_CLK_MAX
} WifiIotPwmClkSource;

typedef enum {
    WIFI_IOT_PWM_PORT_PWM0 = 0,
    WIFI_IOT_PWM_PORT_PWM1 = 1,
    WIFI_IOT_PWM_PORT_PWM2 = 2,
    WIFI_IOT_PWM_PORT_PWM3 = 3,
    WIFI_IOT_PWM_PORT_PWM4 = 4,
    WIFI_IOT_PWM_PORT_PWM5 = 5,
    WIFI_IOT_PWM_PORT_MAX
} WifiIotPwmPort;

unsigned int PwmInit(unsigned int clock, unsigned int port);

unsigned int PwmDeinit(unsigned int port);

unsigned int PwmStart(unsigned int port, unsigned int clock, unsigned short duty, unsigned int freq);

unsigned int PwmStop(unsigned int port);

#endif
